<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    <div>
    <span>1</span>
    <p>1</p>
    <del>1</del>
    </div>

    <script>
        let i = document.querySelector('div')
        i.addEventListener('click',function(e){
            if(e.target.tagName=='P'){
                e.target.style = 'color : red;'
                // alert('')
            }
            console.log(e.target.tagName);
            
        })
    </script>
</body>
</html>